import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { FirstComponent } from './first/first.component';
import { EmptyComponent } from './empty/empty.component';

const routes: Routes = [
  { path: 'first', component: FirstComponent },
  { path: 'second', loadChildren: () => import('./second/second.module').then(m => m.SecondModule) },
  { path: '**', component: EmptyComponent },
];

@NgModule({
  imports: [RouterModule.forRoot(routes)],
  exports: [RouterModule]
})
export class AppRoutingModule { }
